import 'package:flutter/material.dart';
import 'package:test_flutter/constant/resources.dart';
import 'package:test_flutter/model/response/service_model.dart';
import 'package:test_flutter/utils/common_utils/CustomLocalizations.dart';
import 'package:test_flutter/utils/factory/Fit.dart';


class LaundryTargetHero extends StatelessWidget {
  final int position;
  final ServiceModel bean;
  LaundryTargetHero(this.position, this.bean);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Hero(
      tag: 'ppp$position',
      child: SizedBox(
        child: Stack(
          children: <Widget>[
            new Container(
              width: MediaQuery.of(context).size.width,
              height: Fit.scaleY(800),
              decoration: BoxDecoration(
                gradient: LinearGradient(colors: [Color(0xFF18D48B), Color(0xFFFFF68F)]),
                borderRadius: BorderRadius.circular(Fit.scaleX(15)),
              ),
            ),
            new Positioned(
                left: Fit.scaleX(100),
                top: Fit.scaleY(50),
                child: Container(
                    width: Fit.scaleX(400),
                    height: Fit.scaleY(400),
                    decoration: BoxDecoration(
                      image: DecorationImage(
                        image: AssetImage('images/wash.png'),
                        fit: BoxFit.cover,
                      ),
                      borderRadius: BorderRadius.all(
                        Radius.circular(15.0),
                      ),
                    ))),
            new Positioned(
                right: Fit.scaleX(150),
                top: Fit.scaleY(50),
                child: Container(
                  child: Column(
                    children: <Widget>[
                      Container(
                        width: Fit.scaleX(360),
                        padding:
                        EdgeInsets.only(top: Fit.scaleX(80)),
                        child: Text(
                          bean.Remark,
                          textAlign: TextAlign.right,
                          style: new TextStyle(
                              inherit: false,
                              color: Color(0xFFFFFFFF),
                              fontSize: Fit.scaleTextSize(48),
                              fontStyle: FontStyle.italic),
                        ),
                      ),
                      Container(
                        width: Fit.scaleX(360),
                        padding:
                        EdgeInsets.only(top: Fit.scaleX(40)),
                        child: Text(
                          CustomLocalizations.instance.getString(StringIds.time)+': ${bean.WorkingTime} '+CustomLocalizations.instance.getString(StringIds.minutes),
                          textAlign: TextAlign.right,
                          style: new TextStyle(
                              inherit: false,
                              color: Color(0xFFFFFFFF),
                              fontSize: Fit.scaleTextSize(36),
                              fontStyle: FontStyle.normal),
                        ),
                      ),
                      Container(
                        width: Fit.scaleX(360),
                        padding:
                        EdgeInsets.only(top: Fit.scaleX(40)),
                        child: Text(
                          CustomLocalizations.instance.getString(StringIds.billing)+': ${bean.NormalPrice}',
                          textAlign: TextAlign.right,
                          style: new TextStyle(
                              inherit: false,
                              color: Color(0xFFFFFFFF),
                              fontSize: Fit.scaleTextSize(36),
                              fontStyle: FontStyle.normal),
                        ),
                      )
                    ],
                  ),
                )),
            new Positioned(
                left: Fit.scaleY(100),
                right: Fit.scaleY(100),
                top: Fit.scaleY(500),
                child: Text(bean.ServiceDesc,
                    style: new TextStyle(
                        inherit: false,
                        color: Color(0xFFFFFFFF),
                        fontSize: Fit.scaleTextSize(48),
                        fontStyle: FontStyle.italic)
                )
            ),

          ],
        ),
      ),
    );
  }


}
